LXDでHome Assistantを動かす
from 自宅サーバー統一計画
https://seanblanchfield.com/2023/05/home-assistant-os-in-lxd
code:bash
# make a directory to work from
mkdir haos
cd haos/
# download the KVM image
wget https://github.com/home-assistant/operating-system/releases/download/10.1/haos_ova-10.1.qcow2.xz
# extract it
xz -d haos_ova-10.1.qcow2.xz
# make a metadata.yaml file and compress it
cat << EOF > metadata.yaml
architecture: x86_64
creation_date: 1624888256
properties:
description: Home Assistant image
os: Debian
release: buster 10.10
EOF
tar -cvzf metadata.tar.gz metadata.yaml
# import both the KVM image and the metadata file as a new image called "haos"
lxc image import metadata.tar.gz haos_ova-10.1.qcow2 --alias haos
# launch it as a VM
lxc launch haos ha --vm -c security.secureboot=false -d root,size=32GiB
# Set VM limits per advice at https://www.home-assistant.io/installation/linux
lxc stop ha
lxc config set ha limits.cpu=2 limits.memory=2GiB
lxc start ha
これでいける
LXCコンテナではなくQemu のVMを作って、その中でHome Assistant OSが動いてその中でdockerが動く
Bluetoothデバイス渡すのが無理っぽい雰囲気… https://github.com/lxc/lxd/issues/11105
組み込みデバイスのドライバーの問題かもしれないのでBluetoothドングル挿してもうちょっと頑張ってみたい
=>いけた
動作確認済ドングル バッファロー BSBT5D205BK https://www.amazon.co.jp/dp/B0B6PCVVV2